package com.gwcslife.policyservice.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.client.RestTemplate;

@Controller
@RequestMapping("/policy")
public class PolicyController {
    @Autowired
    RestTemplate restTemplate;
    @RequestMapping("/get")
    @ResponseBody
    public String get(){
        String forObject = restTemplate.getForObject("http://insuranceService/insurance/dis/get", String.class);
        return "policy-->"+forObject;
    }
}
